package com.feiyuan.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 统一返回结果枚举类
 */
@Getter
@AllArgsConstructor
@ToString
public enum ResponseEnum {

    SUCCESS(0, "成功"),
    ERROR(-1, "服务器内部错误"),
    BAD_SQL_GRAMMAR_ERROR(-101, "sql语法错误"),
    BORROW_AMOUNT_NULL_ERROR(-201, "借款额度不能为空"),
    SERVLET_ERROR(-102, "servlet请求异常"),
    UPLOAD_ERROR(-103, "文件上传错误"),
    EXPORT_DATA_ERROR(104, "数据导出失败"),
    ADMIN_USERNAME_IS_NOT_REPEAT(-105, "登录的账户名不能重复"),
    ADMIN_LOGIN_IS_NOT_NULL(-106, "用户名或密码不能为空"),
    ADMIN_USER_NAME_IS_NOT_EXIST(-107, "此用户不存在"),
    ADMIN_USER_PASSWORD_ERROR(-108, "密码输入错误");

    // 响应状态码
    private Integer code;
    // 响应信息
    private String message;
}
